package cn.jdx.entity;

import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

//下面的注解是 lombok 生成实体类对象
@Data
@ToString
//下面的注解是注入到 Spring 容器中进行管理
@Component
//配置文件的前缀名称 (如果上面出现红色的警告提示，直接无视它就好了)
@ConfigurationProperties(prefix = "person")
//@PropertySource(value = "classpath:application.yaml") //指定对应的配置文件(这里用不到)
public class Person {

    private String name;
    private int age;
    private boolean happy;
    private Date birth;

    private Map<String, Object> maps;
    private List<Object> lists;
    private Dog dog;

}
